export const dateFor = date => {
  const res = new Date(date)
  const y = res.getFullYear()
  const m = res
    .getMonth()
    .toString()
    .padStart(2, '0')
  const d = res
    .getDate()
    .toString()
    .padStart(2, '0')
  const h = res
    .getHours()
    .toString()
    .padStart(2, '0')
  const min = res
    .getMinutes()
    .toString()
    .padStart(2, '0')
  const s = res
    .getSeconds()
    .toString()
    .padStart(2, '0')

  return `${y}-${m}-${d}  ${h}:${min}:${s}`
}
